package Dao;

import org.springframework.stereotype.Repository;
import pojo.room;

import java.math.BigInteger;
import java.util.List;


public interface roomDao {

    /* 根据运动类别查询匹配房间
    @param sports_id:
    1 basketball
    2 tennis
    3 football
    4 pingpang
    5 badminton
    6 volleyball
    7 baseball
    8 shuttlecock
     */
    public List<room> queryRoomByCategory(String sports_id);


    /*根据房间id进行搜索
    * @param room_id 房间id
    * @return 返回一个房间信息*/
    public room queryRoomById(Long room_id);



    /* 用户加入房间之后的操作
    包括更新current_number和pk_match两个列值
    @return 返回更新结果影响的行数失败返回-1
     */

    public int updateCurrentNumber(int currentNumber,Long room_id);

    public int updateMatchValue(double MatchValue, Long room_id);



    /* 查询房间最大id*/
    public Object queryMaxRoomID();


}
